Skip to content

<fix>[kvm]: ZSV-12657 align no-OS stop config description#4603

Open
zstack-robot-2 wants to merge 1 commit into
feature-zsv-5.1.0-encryptionfrom
sync/zstackio/codex/zbs-revert-wait-client-release@@3
Open

<fix>[kvm]: ZSV-12657 align no-OS stop config description#4603
zstack-robot-2 wants to merge 1 commit into
feature-zsv-5.1.0-encryptionfrom
sync/zstackio/codex/zbs-revert-wait-client-release@@3

Conversation

@zstack-robot-2

Copy link
Copy Markdown
Collaborator

Summary

Align the KVM global-config metadata with the stop strategy used when no guest operating system is detected.

Changes

  • Describe `kvm.stop.vm.without.os.by.force.mode` as switching a grace stop to `cold`.
  • Keep the configuration key, type, default value, and behavior unchanged.

Testing

  • `git diff --check`
  • Verified the paired kvmagent change on a ZBS environment with a VM that has an empty root volume.

Resolves: ZSV-12657

sync from gitlab !10575

Update the KVM global config description from force to cold so it
matches the no-OS fallback implemented by KVM Agent.

Test: git diff --check

Resolves: ZSV-12657

Change-Id: I47b852c437f0c7baa61203d3256b35bdee5cf60a
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 45106c84-8845-4c71-91e6-26d3274008d3

📥 Commits

Reviewing files that changed from the base of the PR and between 81727e9 and 37e3439.

📒 Files selected for processing (1)
  • plugin/kvm/src/main/java/org/zstack/kvm/KVMGlobalConfig.java

Walkthrough

更新 KVM 全局配置项 STOP_VM_WITHOUT_OS_BY_FORCE_MODE 的描述,将停止模式从 force 修改为 cold,其他配置声明保持不变。

Changes

KVM 配置描述

Layer / File(s) Summary
更新停止模式描述
plugin/kvm/src/main/java/org/zstack/kvm/KVMGlobalConfig.java
将配置项描述中的 force 模式修改为 cold 模式,字段、键值及默认值保持不变。

Estimated code review effort: 1 (Trivial) | ~2 minutes

Poem

小兔捧着配置跑,
force 换成 cold 更明了。
字段键值稳稳在,
描述更新蹦蹦跳。
🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 标题准确概括了本次修改:对 KVM 的 no-OS 停止配置描述进行对齐。
Description check ✅ Passed 描述与变更内容一致,说明了配置元数据更新及保持键、类型和默认值不变。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sync/zstackio/codex/zbs-revert-wait-client-release@@3

Comment @coderabbitai help to get the list of available commands.

@zstack-robot-2

Copy link
Copy Markdown
Collaborator Author

Comment from yaohua.wu:

Review: MR !10575 — ZSV-12657

Background (preserved across rounds)

  • Jira: ZSV-12657 — 【虚拟机加密】zbs存储-自定义恢复快照-加密数据盘报错
  • Bug summary: VM 首次启动尚未进入 shell 时,memoryStats.last_update == 0 会触发 no-OS 分支;旧实现转为 force 直接 kill QEMU,管理面进入 Stopped 后 ZBS/CBD client 仍可能未释放,立即 revert 数据盘快照会返回 kFileOccupied
  • Intent & scope: 联合变更把 no-OS 的 grace stop fallback 从 force 改为 libvirt cold,保留配置 key/默认值/API 契约,并同步 Java 元数据、KVM Agent 行为与 premium 文档。
  • Round 1 initial findings: 0 × Critical,0 × High;本 MR 无阻塞 finding。联合变更中有 2 条非阻塞 Warning,均位于 zstack-utility。
  • Suggested fix direction: 当前行为改动方向正确;补强 KVM Agent 的诊断语义与结果型回归测试。

Findings

Severity File:Line Issue Fix
本 MR 仅更新 KVMGlobalConfig 描述;配置 key、Boolean 类型、默认值与绑定关系均未改变,与 utility 的 cold 行为及 premium 文档一致。 无需修改。

关联 MR

MR 关系与状态
zstack-utility !7539 实际把 no-OS grace fallback 改为 cold 并新增测试;存在 2 条非阻塞 Warning:日志仍将“未检测到响应”断言为“无 OS”,测试只验证策略参数而未验证 client 释放结果。
premium !14793 同步配置名称、说明与背景文档;已核对 canonical repair 生成链路,无额外差异。

Coverage

  • 本地 authoritative diff:1/1 文件,generated-file filter 跳过 0 个文件。
  • Upstream freshness:目标分支 feature-zsv-5.1.0-encryption 当前等于 MR base SHA,无新提交、无同文件冲突。
  • Cross-repo consistency:配置 key、默认值、grace → cold 条件和文档语义一致。
  • Verification:git diff --check 通过。

Verdict: APPROVED

本 MR 的元数据变更正确且向后兼容;联合变更的非阻塞项记录在 utility MR。


🤖 Robot Reviewer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant